@extends('Admin.layout.layout')
@section('content')
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>商品管理</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="tabs-container">
                            <ul class="nav nav-tabs" id="navState">
                                <li class="active" data-id="0"><a data-toggle="tab" aria-expanded="true" href="#tab-1">全部</a>
                                </li>
                                <li class="" data-id="1"><a data-toggle="tab" aria-expanded="true" href="#tab-2">违规下架</a>
                                </li>
                                <li class="" data-id="2"><a data-toggle="tab" aria-expanded="true" href="#tab-3">待审核</a>
                                </li>
                            </ul>
                        </div>
                        <div class="ibox-content" style="border:0;">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="input-group fl mr10 mb5">
                                        <input type="text" placeholder="请输入商品名称" class="input-sm form-control">
                                    </div>
                                    <div class="input-group fl mr10 mb5">
                                        <input type="text" placeholder="请输入平台货号" class="input-sm form-control">
                                    </div>
                                    <div class="input-group fl mr10 mb5">
                                        <input type="text" placeholder="输入商品所属店铺名称" class="input-sm form-control">
                                    </div>
                                    <div class="input-group fl mr10 mb5">
                                        <select class="form-control selecth30" name="account">
                                            <option>选择品牌类别</option>
                                            <option>选项 1</option>
                                            <option>选项 2</option>
                                            <option>选项 3</option>
                                            <option>选项 4</option>
                                        </select>
                                    </div>
                                    <div class="input-group fl mr10 mb5">
                                        <select class="form-control selecth30" name="account">
                                            <option>违规(禁售)</option>
                                            <option>选项 1</option>
                                            <option>选项 2</option>
                                            <option>选项 3</option>
                                            <option>选项 4</option>
                                        </select>
                                    </div>
                                    <div class="input-group fl mr10 mb5">
                                        <select class="form-control selecth30" name="account">
                                            <option>选择审核状态</option>
                                            <option>选项 1</option>
                                            <option>选项 2</option>
                                            <option>选项 3</option>
                                            <option>选项 4</option>
                                        </select>
                                    </div>
                                    <div class="input-group fl mr10 mb5">
                                        <select class="form-control selecth30" name="account">
                                            <option>全部分类</option>
                                            <option>选项 1</option>
                                            <option>选项 2</option>
                                            <option>选项 3</option>
                                            <option>选项 4</option>
                                        </select>
                                    </div>
                                    <button type="button" class="btn btn-sm btn-primary fl mb5">查询</button>
                                </div>
                            </div>    
                            <div class="tab-content">
                                <div id="tab-1" class="tab-pane active">
                                    <div class="panel-body">
                                         <table class="table table-striped table-bordered table-hover dataTable" id="editable">
                                            <thead>
                                                <tr>
                                                    <!-- <th width="15">
                                                        <input type="checkbox" class="checkall" name="selectall" />
                                                    </th> -->
                                                    <!-- <th data-field="state" data-checkbox="true"></th> -->
                                                    <th>商品ID</th>
                                                    <th>商品名称</th>
                                                    <th>主图</th>
                                                    <th>店铺名</th>
                                                    <th>公司名</th>
                                                    <th class="center">更新时间</th>
                                                    <th class="center">操作</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr class="no-records-found center"><td colspan="7">没有找到匹配的记录</td></tr>
                                                <tr>
                                                    <!-- <th>
                                                        <input type="checkbox" class="checkall" name="checkBox" />
                                                    </th> -->
                                                    <td><input type="checkbox" class="checkall" name="checkBox" />  15201</td>
                                                    <td>海康威视DS-KH2220室内机</td>
                                                    <td><img width="60" src="{{asset('img/p1.jpg')}}"></td>
                                                    <td class="center">海康威视旗舰店</td>
                                                    <td class="center">海康威旗公司</td>
                                                    <td class="center">2018/02/07</td>
                                                    <td class="center">
                                                        <div class="dropdown">
                                                            <div class="pass" data-id="0" data-type="0"style="float:left;"><a>审核</a></div>
                                                            <div class="switch" style="float:left; margin: 0 20px;">
                                                                <div class="onoffswitch">
                                                                    <input type="checkbox" checked class="onoffswitch-checkbox" id="example1">
                                                                    <label class="onoffswitch-label" for="example1">
                                                                        <span class="onoffswitch-inner" style="text-align: left;"></span>
                                                                        <span class="onoffswitch-switch"></span>
                                                                    </label>
                                                                </div>
                                                            </div>
                                                       <!--  <div class="see" style="float:left;color:#0000ff;">查看</div> -->
                                                            <a class="btn-xs btn-primary check_order" data-id="152000001" style="float:left;">查看</a>
                                                            <div class="force" data-id="0" data-type="1"style="float:left;margin: 0 10px;"><a>强制下架</a></div>
                                                            <div class="recommend" data-id="0" data-type="2"style="float:left;color:red;"><a>推荐</a></div>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <!-- <th>
                                                        <input type="checkbox" class="checkall" name="checkBox" />
                                                    </th> -->
                                                    <td><input type="checkbox" class="checkall" name="checkBox" />  15201</td>
                                                    <td>海康威视DS-KH2220室内机</td>
                                                    <td><img width="60" src="{{asset('img/p1.jpg')}}"></td>
                                                    <td class="center">海康威视旗舰店</td>
                                                    <td class="center">海康威旗公司</td>
                                                    <td class="center">2018/02/07</td>
                                                    <td class="center">
                                                        <div class="dropdown">
                                                            <div class="pass" data-id="0" data-type="0"style="float:left;"><a>审核</a></div>
                                                            <div class="switch" style="float:left; margin: 0 20px;">
                                                                <div class="onoffswitch">
                                                                    <input type="checkbox" checked class="onoffswitch-checkbox" id="example2">
                                                                    <label class="onoffswitch-label" for="example2">
                                                                        <span class="onoffswitch-inner" style="text-align: left;"></span>
                                                                        <span class="onoffswitch-switch"></span>
                                                                    </label>
                                                                </div>
                                                            </div>
                                                       <!--  <div class="see" style="float:left;color:#0000ff;">查看</div> -->
                                                            <a class="btn-xs btn-primary check_order" data-id="152000001" style="float:left;">查看</a>
                                                            <div class="force" data-id="0" data-type="1"style="float:left;margin: 0 10px;"><a>强制下架</a></div>
                                                            <div class="recommend" data-id="0" data-type="2"style="float:left;color:red;"><a>推荐</a></div>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                 <div id="tab-2" class="tab-pane">
                                    <div class="panel-body">
                                         <table class="table table-striped table-bordered table-hover dataTable" id="editable">
                                            <thead>
                                                
                                                <tr>
                                                    <!-- <th width="15">
                                                        <input type="checkbox" class="checkall" name="selectall" />
                                                    </th> -->
                                                    <th>商品ID</th>
                                                    <th>商品名称</th>
                                                    <th>主图</th>
                                                    <th>店铺名</th>
                                                    <th>公司名</th>
                                                    <th class="center">更新时间</th>
                                                    <th class="center">操作</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr class="no-records-found center"><td colspan="7">没有找到匹配的记录</td></tr>
                                                <tr>
                                                   <!--  <th>
                                                        <input type="checkbox" class="checkall" name="checkBox" />
                                                    </th> -->
                                                    <td><input type="checkbox" class="checkall" name="checkBox" />  15201</td>
                                                    <td>海康威视DS-KH2220室内机</td>
                                                    <td><img width="60" src="{{asset('img/p1.jpg')}}"></td>
                                                    <td class="center">海康威视旗舰店</td>
                                                    <td class="center">海康威旗公司</td>
                                                    <td class="center">2018/02/07</td>
                                                    <td class="center">
                                                        <div class="dropdown">
                                                            <div class="pass" data-id="0" data-type="0"style="float:left;"><a>审核</a></div>
                                                            <div class="switch" style="float:left; margin: 0 20px;">
                                                                <div class="onoffswitch">
                                                                    <input type="checkbox" checked class="onoffswitch-checkbox" id="example3">
                                                                    <label class="onoffswitch-label" for="example3">
                                                                        <span class="onoffswitch-inner" style="text-align: left;"></span>
                                                                        <span class="onoffswitch-switch"></span>
                                                                    </label>
                                                                </div>
                                                            </div>
                                                       <!--  <div class="see" style="float:left;color:#0000ff;">查看</div> -->
                                                            <a class="btn-xs btn-primary check_order" data-id="152000001" style="float:left;">查看</a>
                                                            <div class="force" data-id="0" data-type="1"style="float:left;margin: 0 10px;"><a>强制下架</a></div>
                                                            <div class="recommend" data-id="0" data-type="2"style="float:left;color:red;"><a>推荐</a></div>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                <div id="tab-3" class="tab-pane">
                                    <div class="panel-body">
                                         <table class="table table-striped table-bordered table-hover dataTable" id="editable">
                                            <thead>
                                                <tr>

                                                    <!-- <th width="15">
                                                        <input type="checkbox" class="checkall" name="selectall" />
                                                    </th> -->
                                                    <th>商品ID</th>
                                                    <th>商品名称</th>
                                                    <th>主图</th>
                                                    <th>店铺名</th>
                                                    <th>公司名</th>
                                                    <th class="center">更新时间</th>
                                                    <th class="center">操作</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr class="no-records-found center"><td colspan="7">没有找到匹配的记录</td></tr>
                                                <tr>
                                                   <!--  <th>
                                                        <input type="checkbox" class="checkall" name="checkBox" />
                                                    </th> -->
                                                    <td><input type="checkbox" class="checkall" name="checkBox" />  15201</td>
                                                    <td>海康威视DS-KH2220室内机</td>
                                                    <td><img width="60" src="{{asset('img/p1.jpg')}}"></td>
                                                    <td class="center">海康威视旗舰店</td>
                                                    <td class="center">海康威旗公司</td>
                                                    <td class="center">2018/02/07</td>
                                                    <td class="center">
                                                        <div class="dropdown">
                                                            <div class="pass" data-id="0" data-type="0"style="float:left;"><a>审核</a></div>
                                                            <div class="switch" style="float:left; margin: 0 20px;">
                                                                <div class="onoffswitch">
                                                                    <input type="checkbox" checked class="onoffswitch-checkbox" id="example4">
                                                                    <label class="onoffswitch-label" for="example4">
                                                                        <span class="onoffswitch-inner" style="text-align: left;"></span>
                                                                        <span class="onoffswitch-switch"></span>
                                                                    </label>
                                                                </div>
                                                            </div>
                                                       <!--  <div class="see" style="float:left;color:#0000ff;">查看</div> -->
                                                            <a class="btn-xs btn-primary check_order" data-id="152000001" style="float:left;">查看</a>
                                                            <div class="force" data-id="0" data-type="1"style="float:left;margin: 0 10px;"><a>强制下架</a></div>
                                                            <div class="recommend" data-id="0" data-type="2"style="float:left;color:red;"><a>推荐</a></div>
                                                        </div>
                                                    </td>
                                                </tr>
                                                 <tr>
                                                   <!--  <th>
                                                        <input type="checkbox" class="checkall" name="checkBox" />
                                                    </th> -->
                                                    <td><input type="checkbox" class="checkall" name="checkBox" />  15201</td>
                                                    <td>海康威视DS-KH2220室内机</td>
                                                    <td><img width="60" src="{{asset('img/p1.jpg')}}"></td>
                                                    <td class="center">海康威视旗舰店</td>
                                                    <td class="center">海康威旗公司</td>
                                                    <td class="center">2018/02/07</td>
                                                    <td class="center">
                                                        <div class="dropdown">
                                                            <div class="pass" data-id="0" data-type="0"style="float:left;"><a>审核</a></div>
                                                            <div class="switch" style="float:left; margin: 0 20px;">
                                                                <div class="onoffswitch">
                                                                    <input type="checkbox" checked class="onoffswitch-checkbox" id="example5">
                                                                    <label class="onoffswitch-label" for="example5">
                                                                        <span class="onoffswitch-inner" style="text-align: left;"></span>
                                                                        <span class="onoffswitch-switch"></span>
                                                                    </label>
                                                                </div>
                                                            </div>
                                                       <!--  <div class="see" style="float:left;color:#0000ff;">查看</div> -->
                                                            <a class="btn-xs btn-primary check_order" data-id="152000001" style="float:left;">查看</a>
                                                            <div class="force" data-id="0" data-type="1"style="float:left;margin: 0 10px;"><a>强制下架</a></div>
                                                            <div class="recommend" data-id="0" data-type="2"style="float:left;color:red;"><a>推荐</a></div>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-12">
                                        <div class="dataTables_paginate paging_simple_numbers" id="editable_paginate">
                                            <ul class="pagination">
                                                <li class="paginate_button previous" aria-controls="editable" tabindex="0" id="editable_previous">
                                                    <a href="#">上一页</a>
                                                </li>
                                                <li class="paginate_button " aria-controls="editable" tabindex="0">
                                                    <a href="#">1</a>
                                                </li>
                                                <li class="paginate_button " aria-controls="editable" tabindex="0">
                                                    <a href="#">2</a>
                                                </li>
                                                <li class="paginate_button " aria-controls="editable" tabindex="0">
                                                    <a href="#">3</a>
                                                </li>
                                                <li class="paginate_button active" aria-controls="editable" tabindex="0">
                                                    <a href="#">4</a>
                                                </li>
                                                <li class="paginate_button " aria-controls="editable" tabindex="0">
                                                    <a href="#">5</a>
                                                </li>
                                                <li class="paginate_button " aria-controls="editable" tabindex="0">
                                                    <a href="#">6</a>
                                                </li>
                                                <li class="paginate_button next" aria-controls="editable" tabindex="0" id="editable_next">
                                                    <a href="#">下一页</a>
                                                </li>
                                                <li>&nbsp;&nbsp;共437页，到第&nbsp;&nbsp;<input type="text" class="g-input">&nbsp;页&nbsp;<input type="button" onclick="" value="确定" class="btn btn-sm btn-primary"></input>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="{{asset('js/plugins/layer/layer.min.js')}}"></script>
    <script src="{{asset('js/plugins/switchery/switchery.js')}}"></script>
    
    <script>
        $(document).ready(function () {
            // $("#navState li").on('click', function (event) {
            //     console.log($("#navState li"))
            //     event.preventDefault();
            //     $("#navState li").removeClass('active');
            //     $(this).addClass('active');
            //     var state = $(this).attr('data-id');
            //     location.href = '?state=' + state;
            // });
            // $('.dropdown div').click(function(){
            //     var id = $(this).attr('data-id');
            //     var type = $(this).attr('data-type');
            //     $.ajax({
            //         url: '',
            //         type: 'GET',
            //         dataType: 'json',
            //         data: {'id' : id,'type' : type},
            //         success: function (data) {
            //             if (0 == data.code) {
            //                 layer.alert(data.message, {
            //                     icon: 1
            //                 }, function () {
            //                     location.reload();
            //                 });
            //             } else {
            //                 layer.alert(data.message, {
            //                     icon: 2
            //                 });
            //             }
            //         }
            //     });
            // })
        });
         //查看订单
        $('.check_order').click(function(){
            var url = 'foradmin/order/details';//前端模板测试
            //var url = '/order/details/' + $(this).attr('data-id');//前端正式
            var title = '订单详情';
            open_page(url, title);//打开新页面
            /*$(window.parent.document).find('.J_menuTabs .page-tabs-content a').removeClass('active');
            $(window.parent.document).find('.J_menuTabs .page-tabs-content').append('<a href="javascript:;" class="J_menuTab active" data-id="'+url+'">'+title+' <i class="fa fa-times-circle"></i></a>');
            // 添加选项卡对应的iframe
            var str1 = '<iframe class="J_iframe" name="iframe' + $(this).attr('data-id') + '" width="100%" height="100%" src="' + url + '" frameborder="0" data-id="' + url + '" seamless></iframe>';
            $(window.parent.document).find('.J_mainContent').find('iframe.J_iframe').hide().parents('.J_mainContent').append(str1);*/
        })
        $(function(){
            // var elem1 = document.querySelector('#example1');
            // var switchery = new Switchery(elem1, {
            //     color: '#ff6600',
            //     size:'small'
            // });
        })

    </script>
@endsection